import numpy as np


def gen_c_data2file(shape):
    # assume shape is organized in [dim_z, dim_y, dim_x] order
    # dim_z, dim_y, dim_x = shape

    c_model = np.zeros(shape, dtype=np.float64)

    # first specify regular-shaped regions
    c_model[:, :, :80] = 1500               # close to water surface
    c_model[:, :, 80:] = 2500               # far from water surface

    # then specify irregular-shaped regions

    c_model[:, 400:430, 50:56] = 2500

    # finally store this c model to file as binary
    fp = open("../c_models/Sea1_local.c_model", "wb")
    c_model.tofile(fp)


if __name__ == '__main__':
    gen_c_data2file([401, 1051, 181])
